<template>
  <!-- 文章作者列表 横滑 -->
  <div class="all-author">
    <!-- <div class="part-title">创作者</div> -->
    <div class="author-list">
      <div class="author-box">
        <div
          class="author-item"
          v-for="item in creators"
          :key="item.uuid"
          v-app-jump="{ to: `mtjimu://works?id=${data.workId}` }"
        >
          <img class="avatar" :src="item.avatar | imgSize(100, 100)" />
          <div class="author-info single-line-ellipsis">
            <p class="nickname single-line-ellipsis ">{{ item.nickname }}</p>
            <p class="job">{{ item.profession }}</p>
          </div>
          <button class="follow-btn" v-if="item.uuid">关注</button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    props: {
      creators: {
        type: Array,
      },
      data: {
        type: Object,
      },
    },
    data() {
      return {};
    },
    methods: {},
  };
</script>

<style lang="less">
  .all-author {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
    ::-webkit-scrollbar {
      background: transparent;
      width: 0;
    }
    ::-webkit-scrollbar-thumb {
      background: transparent;
    }
    ::-webkit-scrollbar-track-piece {
      background: transparent;
    }
    .author-list {
      overflow-y: scroll;
      width: 100%;
      .author-box {
        width: 100%;
        display: flex;
      }
      .author-item {
        flex: none;
        width: 100%;
        height: 8.3rem;
        background: rgba(#ffffff, 0.05);
        border-radius: 0.15rem;
        margin-right: 1.4rem;
        display: flex;
        align-items: center;
        padding: 1.7rem;
        justify-content: space-between;

        .avatar {
          width: 5rem;
          height: 5rem;
          border-radius: 50%;
          margin-right: 1.2rem;
          flex: none;
        }
        .nickname {
          font-size: 1.7rem;
          font-weight: 800;
          color: #ffffff;
        }
        .job {
          font-size: 1.2rem;
          color: rgba(#ffffff, 0.5);
        }
        .author-info {
          width: 100%;
        }
        .follow-btn {
          width: 6rem;
          height: 2.8rem;
          border-width: 0.1rem;
          font-size: 1.4rem;
        }
      }
    }
  }
</style>
